I've found a few posts, but they seem quite dated now. Can somebody tell me if there is any standard preloading that happens in ZenPhoto? Or should I be putting the printPreloadScript on my image pages?
On that subject, would it be better to simply use getNextImageURL and set it's display:none? That way, the preload wouldn't be dependent on Javascript.
Lastly, is there a standard way to load the next, say, 3 images instead of just the next one?
Thanks in advance for any input.
Comments
There is no way to do that without the javascript you mentioned. Also there are lots of other js solutions out there you could try to adapt.
If you want the next three, load the next three. Look at the way printPreloadScript works to see how.
but i'm confused. am i correct that the method i'm suggesting does indeed accomplish the preload without Javascript? It's a minor issue; just curious. Thanks.
At the end of image.php, I just have the following ("hidden" is a CSS class for display:noone)...
`
<?php if ($hasNextImage()) { $nextImage = $_zp_current_image->getNextImage(); echo "getFullImage()."\" alt=\"\"/>"; }
if ($hasPrevImage()) { $prevImage = $_zp_current_image->getPrevImage(); echo "getFullImage()."\" alt=\"\"/>"; } ?>
`
-the next two pics
-the previous pic
-all the thumbs for the album (since i display all the image thumbs via rollover on every image page)
it's working pretty well now i think.
if I trying your code I get an Error: "call to undefined function...."
gracestanat how did you make it?
`
<?php if (hasNextImage()) { $nextImage = $_zp_current_image->getNextImage(); echo "getFullImage()."\" alt=\"\"/>"; }
if (hasPrevImage()) { $prevImage = $_zp_current_image->getPrevImage(); echo "getFullImage()."\" alt=\"\"/>"; } ?>
`
</div>
This code works for getting the prev/next fullsize-image. Any one, how to get de DefaultSizedImage?